<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8" />
    <title>联系我们</title>
    <link rel="stylesheet" href="css/yueke.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <style type="text/css">
        /* 百度地图 */
        .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap; }
        .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word; }
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
</head>
<body class="background_grey">
    <div class="header">
        <div class="header_in">
            <div class="header_logo">
                <h1></h1>
                <img src="images/index_log.jpg" />
            </div>
            <div class="header_nav">
                <ul>
                    <li><a href="model_news_list.html">前沿资讯</a></li>
                    <li><a href="model_problem_list.html">互动问答</a></li>
                    <li><a href="model_personage_center.html">帮助中心</a></li>
                </ul>
            </div>
            <div class="header_info">
                <div class="header_info_find"><a href="model_person_index.html">寻找合作伙伴</a></div>
                <div class="header_greet">
                    enzo，您好
                </div>
                <div class="header_register display_none">
                    <a href="#">登录</a>|
                    <a href="#">注册</a>
                </div>
                <div class="header_exit">
                    <a href="#">我的项目</a>|
                    <a href="#">退出</a>
                </div>
                <div class="header_become display_none">
                    <a href="#">成为我们的专家</a>
                </div>
            </div>
            <div class="clear_both"></div>
        </div>
    </div>
    <div class="personage_wrap">
        <div class="personage_nav company_nav">
            <div class="personage_nav_title">关于我们</div>
            <ul class="personage_nav_list">
                <li class="item1">
                    <span></span>公司介绍
                </li>
                <li class="item2">
                    <span></span>新闻公告
                </li>
                <li class="item3">
                    <span></span>团队介绍
                </li>
            </ul>
            <div class="personage_nav_title">交易指南</div>
            <ul class="personage_nav_list">
                <li class="item4">
                    <span></span>客户说明
                </li>
                <li class="item5">
                    <span></span>极客说明
                </li>
            </ul>
            <div class="personage_nav_title">意见反馈</div>
            <ul class="personage_nav_list">
                <li class="item6 active">
                    <span></span>联系我们
                </li>
                <li class="item7">
                    <span></span>用户协议
                </li>
                <li class="item8">
                    <span></span>投诉仲裁
                </li>
                <li class="item9">
                    <span></span>意见反馈
                </li>
            </ul>
        </div>
        <div class="personage_main">
            <div class="company_introduce_title">
                <h2>联系我们</h2>
            </div>
            <div class="personage_main_in">
                <div class="contact_us_detail">
                    <div class="contact_us_detail_map">
                        <div style="width:900px;height:300px;border:#ccc solid 1px;" id="dituContent"></div>
                    </div>
                    <ul class="contact_us_list">
                        <li class="contact_us_item">
                            <span>地址</span>广州市天河区元岗横路37号天河慧通产业广场B4栋2楼
                        </li>
                        <li class="contact_us_item">
                            <span>地址</span>XXXXX@inrice.com
                        </li>
                        <li class="contact_us_item">
                            <span>电话</span>+86 20 38838993
                        </li>
                        <li class="contact_us_item">
                            <span>传真</span>+86 20 38838993
                        </li>
                        <li class="contact_us_item">
                            <span>如有需要请联系我们，我们会提供优质的服务</span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="index_footer">
        <div class="index_footer_link">
            <a href="">新闻公告</a>|
            <a href="">关于我们</a>|
            <a href="">联系我们</a>|
            <a href="">用户协议</a>
        </div>
        <p class="index_footer_copy">Copyright©2016 yk-zb.com 粤科众包 版权所有 粤ICP备16027165号-1</p>
    </div>
</body>
<script type="text/javascript">
        /*左边导航*/
        (function fnTab(){
            for( var i = 0; i< $('.personage_nav li').length; i++){
                if($('.personage_nav li').eq(i).hasClass('active')){
                    console.log(i);
                    var index = i;
                }
            }

            $('.personage_nav li').hover(function() {
                $('.personage_nav li').eq(index).addClass('active');
                $(this).addClass('active');
            }, function() {
                $(this).removeClass('active');
                $('.personage_nav li').eq(index).addClass('active');
            });
                
        })();
    //创建和初始化地图函数：
    function initMap(){
        createMap();//创建地图
        setMapEvent();//设置地图事件
        addMapControl();//向地图添加控件
        addMarker();//向地图中添加marker
    }
    
    //创建地图函数：
    function createMap(){
        var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
        var point = new BMap.Point(113.325662,23.093897);//定义一个中心点坐标
        map.centerAndZoom(point,18);//设定地图的中心点和坐标并将地图显示在地图容器中
        window.map = map;//将map变量存储在全局
    }
    
    //地图事件设置函数：
    function setMapEvent(){
        map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
        map.enableScrollWheelZoom();//启用地图滚轮放大缩小
        map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
        map.enableKeyboard();//启用键盘上下左右键移动地图
    }
    
    //地图控件添加函数：
    function addMapControl(){
        //向地图中添加缩放控件
    var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
    map.addControl(ctrl_nav);
        //向地图中添加缩略图控件
    var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:0});
    map.addControl(ctrl_ove);
        //向地图中添加比例尺控件
    var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
    map.addControl(ctrl_sca);
    }
    
    //标注点数组
    var markerArr = [{title:"粤科众包",content:"公司信息",point:"113.326224|23.093922",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
         ];
    //创建marker
    function addMarker(){
        for(var i=0;i<markerArr.length;i++){
            var json = markerArr[i];
            var p0 = json.point.split("|")[0];
            var p1 = json.point.split("|")[1];
            var point = new BMap.Point(p0,p1);
            var iconImg = createIcon(json.icon);
            var marker = new BMap.Marker(point,{icon:iconImg});
            var iw = createInfoWindow(i);
            var label = new BMap.Label(json.title,{"offset":new BMap.Size(json.icon.lb-json.icon.x+10,-20)});
            marker.setLabel(label);
            map.addOverlay(marker);
            label.setStyle({
                        borderColor:"#808080",
                        color:"#333",
                        cursor:"pointer"
            });
            
            (function(){
                var index = i;
                var _iw = createInfoWindow(i);
                var _marker = marker;
                _marker.addEventListener("click",function(){
                    this.openInfoWindow(_iw);
                });
                _iw.addEventListener("open",function(){
                    _marker.getLabel().hide();
                })
                _iw.addEventListener("close",function(){
                    _marker.getLabel().show();
                })
                label.addEventListener("click",function(){
                    _marker.openInfoWindow(_iw);
                })
                if(!!json.isOpen){
                    label.hide();
                    _marker.openInfoWindow(_iw);
                }
            })()
        }
    }
    //创建InfoWindow
    function createInfoWindow(i){
        var json = markerArr[i];
        var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>"+json.content+"</div>");
        return iw;
    }
    //创建一个Icon
    function createIcon(json){
        var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)})
        return icon;
    }
    
    initMap();//创建和初始化地图
</script>
</html>
<script type="text/javascript">
    $(function() {
    });
</script>
